1. Field of the Invention
The present invention relates to an image processing apparatus and image processing method for compressing an original image such as a photographic image by performing entropy encoding on the original image. The present invention also relates to a program for causing a computer to execute the image processing method.
2. Description of the Related Art
Generally, in the field of JPEG (Joint Photographic Experts Group) compression, image data is divided into blocks, and discrete cosine transform (DCT) is performed on the image data. Then, bit allocation is determined, and quantized data is obtained by quantizing the image data. Then, entropy encoding is performed on the quantized data by using a technique such as run length encoding and Huffman encoding. In the encoding method using the DCT, data in each of the blocks is decomposed into direct current components and alternating current components. The alternating current components are components which represent structures in a frequency range including both low frequencies and high frequencies in each of the blocks. Therefore, the image data can be compressed by performing frequency conversion on the image data by using a technique such as wavelet transform, and further performing entropy encoding on the data which is obtained by the frequency conversion.
A method has been proposed to increase a compression rate of an image, in other words, to compress the image more, without lowering the visual quality of the image. In this method, when the image is compressed by performing entropy encoding, as described above, the quantization step is modified according to the average luminance of a DCT coefficient obtained by DCT (Japanese Unexamined Patent Publication No. 7(1995)-203432).
Conventionally, beautiful skin processing is performed on an original image (hereinafter, simply referred to as an image, for short) which includes a human face to suppress or remove wrinkles, freckles, or the like, which are included in the photographic image. For example, a low-pass filter (LPF), which is generally used for noise. reduction processing, may be applied to the photographic image to perform beautiful skin processing.
Further, a method for removing wrinkles, freckles, or the like while retaining the volume texture and surface texture of skin is disclosed in U.S. Pat. No. 6,895,124. In this method, components such as wrinkles are extracted from an image by applying a non-linear function using a large threshold value ε0. Then, components representing the volume texture or surface texture of the skin are extracted from the image by applying a non-linear function using a small threshold value ε0. Further, the components such as the wrinkles are subtracted from original signals, and the components representing the volume texture and surface texture of the skin are added to the original signals. Accordingly, the wrinkles, freckles, or the like are removed, and the volume texture and surface texture of the skin are retained at the same time.
When the image is compressed as described above, if the image is compressed at a higher compression rate, the data amount of a compressed image can be reduced. However, the image quality deteriorates.